home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3199 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: malve.informatik.uni-bonn.de!malerz
  2. From: malerz@athene.informatik.uni-bonn.de (Andreas Malerz)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Fastest way to clear a Window?
  5. Date: 8 Feb 1996 13:46:57 GMT
  6. Organization: Rheinische Friedrich-Wilhelms-Universit"at Bonn, Institut
  7. Message-ID: <4fcush$58b@apoll.informatik.uni-bonn.de>
  8. References: <4fck5b$7mm@leofric.coventry.ac.uk>
  9. NNTP-Posting-Host: malve.informatik.uni-bonn.de
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Dave Jackson (dj@coventry.ac.uk) wrote:
  13. : I'm writing a 3d graphics viewer thingy using intuition windows.  What I 
  14. : want to know is, what is the fastest way of clearing a window?  At the 
  15. : moment I'm using SetRast() but there must be a faster way.  I'm using a 
  16. : custom screen, so I could make it draw lines on a single bitplane and 
  17. : then just clear that one plane, but the RKM:Libraries has nothing on how 
  18. : to clear one plane...  help!
  19.  
  20. : TIA
  21. : Dave Jackson
  22.  
  23. Depending on your processor, you can try to do it with the CPU itself.
  24. The fastest way I know is the following:
  25.  
  26.   Save all registers on STACK
  27.   Save STACK-Pointer somewhere else
  28.  
  29.   Clear all registers
  30.   Put the Address of your bitplane in one Adressregister
  31.   Copy the registers to your plane with "movem"
  32.   Do the last step as often as necessary.
  33.  
  34.   Restore STACK-Pointer
  35.   Restore all registers.
  36.  
  37. This solution is systemfriendly and on a fast processor faster than the
  38. blitter.
  39.  
  40.     Best greetings,
  41.         Andy.
  42.